Security News
Opengrep Emerges as Open Source Alternative Amid Semgrep Licensing Controversy
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
🎲 Crypto secure salt generator
Coded with ❤️ by Simone Primarosa.
npm install --save @kdf/salt
const gensalt = require('@kdf/salt');
gensalt(16).then(salt => {
console.log(salt);
// => <Buffer 70 2c 6e 1c c1 07 2e 26 dc 82 52 4e 1b cf 1d 23>
console.log(salt.toString('base64'));
// => cCxuHMEHLibcglJOG88dIw==
console.log(salt.toString('hex'));
// => 702c6e1cc1072e26dc82524e1bcf1d23
})
Promise.<Buffer>
Generates a cryptographically secure random string to be used as a password salt , using Node's built-in crypto.randomBytes() function.
Kind: global function
Returns: Promise.<Buffer>
- The salt as a Buffer.
Access: public
Param | Type | Description |
---|---|---|
length | number | The length of the salt to be generated. Must be an integer within the range (0 <= length <= 2^31-1 ). |
Contributions are REALLY welcome and if you find a security flaw in this code, PLEASE report it.
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the license file for details.
FAQs
Crypto secure salt generator
The npm package @kdf/salt receives a total of 7,240 weekly downloads. As such, @kdf/salt popularity was classified as popular.
We found that @kdf/salt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Opengrep forks Semgrep to preserve open source SAST in response to controversial licensing changes.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.